#include <iostream>

class Base
{
public:
    virtual void show()
    {
        std::cout<<"Base"<<std::endl;
    }
};

class Derived:public Base
{
public:
    void show() //名词遮蔽：子类函数和父类函数同名，父类的该函数被隐藏无法调用
                //函数重写：函数完全一样
    {
        std::cout<<"Derived"<<std::endl;
    }
};

int main()
{
    Derived *d = new Derived;
    d->show();
    return 0;
}